var sendT = {
    // 获取当前系统时间
    getCurrentT: function (){
        let date = new Date();
        let d = ('0' + date.getDate()).slice(-2);
        let m = ('0' + (date.getMonth()+1)).slice(-2);
        let y = date.getFullYear();
        let currentDate = y + '-' + m + '-' + d;
        return currentDate;
    },
    // 判断当前时间和实际时间
    isOverTime: function (){
        let currentTime = sendT.getCurrentT()
        return this;
    },
    // 添加当前用户
    getCurrentUser: function () {
        let usersCookie = $.cookie("users");
        let users = JSON.parse(usersCookie);
        $("#sendtaskuser").val(users.name);
        console.log()
    },
    // 逾期提交事件
    subOverfeedback: function (){
       let oid = $("#oid").val();
       let oContent = $("#oContent").val();
       let oDate = $("#latedate").val();
       let dataType = 'tasklst'
        $.ajax({
            url: '../tasklst/UpdateOverfeedback',
            type: 'post',
            dataType: 'json',
            data: {dataId: oid, overduefeedback: oContent, latefeedbackdate: oDate, dataType: dataType},
            async: false,
            success: function (result) {
                if (result.resultCode == 200) {
                    setTimeout(function () {
                        com.queryDatas(dataType);
                        $("button[name='bt-close']").click();
                    }, 2000);
                    com.alterMessage("提交成功！", "success");
                } else {
                    com.alterMessage(result.msg, "warning");
                }
                // $(obj).removeAttr("disabled");
            }
        });
    },
    // 提交完成表单
    subComplate: function () {
        let cid = $("#cid").val();
        let cContent = $("#cContent").val();
        let cDate = $("#complatedate").val();
        let dataType = 'tasklst'
        console.log(cid,cContent,cDate)
        $.ajax({
            url: '../tasklst/UpdateComplate',
            type: 'post',
            dataType: 'json',
            data: {dataId: cid, taskendfeedback: cContent, taskendfeedbackdate: cDate, dataType: dataType},
            async: false,
            success: function (result) {
                if (result.resultCode == 200) {
                    setTimeout(function () {
                        com.queryDatas(dataType);
                        $("button[name='bt-close']").click();
                    }, 2000);
                    com.alterMessage("提交成功！", "success");
                } else {
                    com.alterMessage(result.msg, "warning");
                }
                // $(obj).removeAttr("disabled");
            }
        });
    }
}